-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature that can disable traffic generator metrics. #807
Add feature that can disable traffic generator metrics. #807
Conversation
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, few comments
if metricsBlacklist == nil { | ||
metricsBlacklist = []string{} | ||
} | ||
if metricsFuzzyBlacklist == nil { | ||
metricsFuzzyBlacklist = []string{} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I don't think these are needed
@@ -106,6 +106,9 @@ func NewConfig(ctx *cli.Context) (*Config, error) { | |||
EigenDAServiceManager: retrieverConfig.EigenDAServiceManagerAddr, | |||
SignerPrivateKey: ctx.String(SignerPrivateKeyFlag.Name), | |||
CustomQuorums: customQuorumsUint8, | |||
|
|||
MetricsBlacklist: ctx.StringSlice(MetricsBlacklistFlag.Name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need both flags?
could we just use MetricsFuzzyBlacklist
? not sure what use cases there are where we want exact matching vs. fuzzy matching (fuzzy matching can cover all use cases we need for exact matching)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fuzzy matching is needed to handle metric labels that contain DA node IDs. Exact matching is needed to disable metrics where one metric is a substring of another. For example, there are two metrics labeled read
and read_success
. Without exact matching, we couldn't disable the read
metric without also disabling the read_success
metric.
The only straight forward way to avoid having two lists would be to interpret each entry as a regex. In your opinion, would you prefer to have a single list of regex blacklist arguments, or the current pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. That makes sense. I think the current pattern is simpler in that case
@@ -14,14 +14,19 @@ type CountMetric interface { | |||
type countMetric struct { | |||
metrics *metrics | |||
description string | |||
// If true, the metric is disabled and should behave as a no-op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: disabled specifies whether the metrics should behave as a no-op
or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wording updated
Signed-off-by: Cody Littley <[email protected]>
Why are these changes needed?
We may not want all metrics to be enabled for the traffic generator.
Checks